<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich" >

	<ui:composition template="/templates/telainicialPagina2.xhtml" >
		<ui:define name="js">
			<h:outputScript library="js" name="jquery.maskedinput-1.2.2.min.js" target="body" />
		</ui:define>
		<ui:define name="css">
			<link rel="stylesheet" type="text/css" href="style/folha.css" media="screen" />
			<link rel="stylesheet" type="text/css" href="style/folhaextra.css" media="screen" />
			<link rel="stylesheet" type="text/css" href="style/folha_lojista6.css" media="screen" />
			<style type="text/css">
				body {
					margin-left: 0px;
					margin-top: 0px;
					margin-right: 0px;
					margin-bottom: 0px;
				}
				a:link {
					color: #2f3191;
					text-decoration: none;
				}
				a:visited {
					text-decoration: none;
					color: #2f3191;
				}
				a:hover {
					text-decoration: underline;
					color: #0033FF;
				}
				a:active {
					text-decoration: none;
					color: #2f3191;
				}
			</style>
		</ui:define>
		
		<ui:define name="linkusa">
			<h:form>
   	  			<a4j:commandLink action="#{telaInicialBean.inicio}">
   	  				<img src="images/logo.gif" width="198" height="96" />
   	  			</a4j:commandLink>
   	  		</h:form>
		</ui:define>
		
		<ui:define name="linksup1">
			<h:form>
    			<a4j:commandLink action="#{telaInicialBean.sobreUsaPre}" value="Sobre o USACARD PRÉ" styleClass="menusupclass" />
   			</h:form>
		</ui:define>
		<ui:define name="linksup2">
			<h:form>
    			<a4j:commandLink action="#{telaInicialBean.todasAsVantagens}" value="+ Vantagens" styleClass="menusupclass" />
   			</h:form>
		</ui:define>
		<ui:define name="linksup3">
			<h:form>
       			<a4j:commandLink action="#{telaInicialBean.duvidasFrequentes}" value="Dúvidas Frequentes" styleClass="menusupclass" />
       		</h:form>
		</ui:define>
		<ui:define name="linksup4">
			<h:form>
       			<a4j:commandLink action="#{telaInicialBean.contatos}" value="Contato" styleClass="menusupclass" />
       		</h:form>	
		</ui:define>
		
		<ui:define name="login">
			<h:form id="formLogin" onkeypress="if (event.keyCode == 13) { document.getElementById('formLogin:loginSubmit').click(); return false; }">
				
	       	  	<div class="login_box">
           			<div class="text1">MINHA CONTA</div>
            		<div class="field1_text" align="right">login:</div>
            		<div class="field1"><h:inputText value="#{loginUsaPreBean.login}" size="25" styleClass="inputstyle" /></div>
	            	<div class="field1_text" align="right">senha:</div>
	            	<div class="field1"><h:inputSecret value="#{loginUsaPreBean.senha}" size="25" styleClass="inputstyle" /></div>
	            	<div class="field2_text" id="link2">
	            		<a4j:commandLink id="loginSubmit" styleClass="labellogin" action="#{loginUsaPreBean.logon}" value="login" />
	            	</div>
            		<div class="text2" id="link2">
            			<a4j:commandLink styleClass="itemlinkclass" value="não consigo logar" action="#{telaInicialBean.esqueceuSenha}" /> | 
	            		<a4j:commandLink styleClass="itemlinkclass" value="peça o seu" action="#{telaInicialBean.cadastreSe}" />
	        		</div>
       			</div>
				
			</h:form>
		</ui:define>
		
		<ui:define name="banner">
			<img src="images/banner7.jpg" width="1000" height="160" />
		</ui:define>
		<ui:define name="interior">
			
			<h:form id="form01">
		
				<div class="lojista_menu_lateral">
				
					<div class="lojista_menu_lateral_item5" id="link_lojista">
						<img src="images/solicitar_credenciamento.jpg" alt="" width="240" height="129" />
					</div>
		    		<div class="lojista_menu_lateral_item3" id="link_lojista"><strong>
		    			<a4j:commandLink action="#{lojistaBean.cadastrarPrecos}" value="Cadastrar Preços" render="@form" /></strong>
		    		</div>
		    		<div class="lojista_menu_lateral_item3" id="link_lojista"><strong>
			    		<a4j:commandLink action="#{lojistaBean.cadastrarDesconto}" value="Cadastrar Desconto" render="@form" /></strong>
			    	</div>
			    	<div class="lojista_menu_lateral_item3" id="link_lojista"><strong>
		    			<a4j:commandLink action="#{lojistaBean.gerenciamentoVendasRepasses}" value="Gerenciamento de Vendas e Repasses" render="@form" /></strong>
		    		</div>
		    		<div class="lojista_menu_lateral_item3" id="link_lojista"><strong>
		    			<a4j:commandLink action="#{lojistaBean.recebimentoAntecipado}" value="Recebimento antecipado" render="@form" /></strong>
		    		</div>
		    		<div class="lojista_menu_lateral_item3" id="link_lojista"><strong>
		    			<a4j:commandLink action="#{lojistaBean.vantagem}" value="Vantagens" render="@form" /></strong>
		    		</div>
		
        		</div>

      			
      			<div class="lojista_regua"></div>
		      	<div class="lojista_titulo1_d"><img src="images/6px.gif" alt="" width="6" height="6" />Preencher dados</div>
		      	<div class="lojista_titulo1_1_1"><img src="images/seta.gif" alt="" width="12" height="22" /></div>
		      	<div class="lojista_titulo1_c"><strong>Solicitar Credenciamento</strong></div>
		      	<div class="numero1_text_aba20"></div>
		      	<div class="numero_text_aba20_a"> <strong>1</strong></div>
		      	<div class="text_aba20_a"> <strong>Tipo de Credenciamento</strong> </div>
		      	<div class="line_aba20"></div>
		      	<div class="numero1_text_aba20"></div>
		      	<div class="numero1_text_aba20"></div>
		      	<div class="text_1_aba20">
		        	<h:selectOneMenu value="#{cadastroLojistaBean.pessoaEscolhida}" style="width:300px" >
	          			<f:selectItem itemLabel="Selecione" noSelectionOption="true" />
	          			<f:selectItems value="#{cadastroLojistaBean.tipoPessoas}"/>
	          			<f:ajax event="change" listener="#{cadastroLojistaBean.atualizaPessoaEscolhida}" render="@all" />
	          		</h:selectOneMenu>
		      	</div>
		      	
		      	<h:panelGroup rendered="#{cadastroLojistaBean.pessoaJuridica}">
			    
			  		<div class="text_2_aba20" align="right">CNPJ</div>
			  		<div class="field_1_aba20">
			  			<h:inputText id="cnpj" maxlength="18" value="#{cadastroLojistaBean.cnpj}" style="width:150px"  />
			  			<rich:jQuery selector="#form01\:cnpj" query="mask('99.999.999/9999-99')" timing="domready" />
			  		</div>
				  	<div class="text_2_aba20" align="right">Razão Social</div>
				  	<div class="field_1_aba20">
				  		<h:inputText value="#{cadastroLojistaBean.razaoSocial}" style="width:150px"/>
				  	</div>
				  	<div class="text_2_aba20" align="right">Fantasia</div>
				  	<div class="field_1_aba20">
				  		<h:inputText value="#{cadastroLojistaBean.nomeFantasia}" style="width:150px"/>
				  	</div>
			  	
			  	</h:panelGroup>
			  	<h:panelGroup rendered="#{cadastroLojistaBean.pessoaFisica}">
			    
			  		<div class="text_2_aba20" align="right">CPF</div>
			  		<div class="field_1_aba20">
			  			<h:inputText id="cpf" maxlength="14" value="#{cadastroLojistaBean.cpf}" style="width:150px" />
			  			<rich:jQuery selector="#form01\:cpf" query="mask('999.999.999-99')" timing="domready" />
			  		</div>
				  	<div class="text_2_aba20" align="right">Nome</div>
				  	<div class="field_1_aba20">
				  		<h:inputText value="#{cadastroLojistaBean.nome}" style="width:150px" />
				  	</div>

			  	</h:panelGroup>
		      	
		      	<h:panelGroup rendered="#{cadastroLojistaBean.pessoa}">
			  		<div class="text_2_aba20" align="right">Ramo de Atividade</div>
				  	<div class="field_1_aba20">
				    	<h:selectOneMenu value="#{cadastroLojistaBean.ramoAtividade}" converter="ramoAtividadeConverter" style="width:150px" >
		          			<f:selectItem itemLabel="Selecione" noSelectionOption="true" />
		          			<f:selectItems value="#{cadastroLojistaBean.ramoAtividadeLista}" var="ramoatividade" itemLabel="#{ramoatividade.nome}" itemValue="#{ramoatividade}" />
		          		</h:selectOneMenu>
				  	</div>
			  	
				  	<div class="numero1_text_aba20"></div>
			      	<div class="numero2_text_aba20"> <strong>1.1</strong></div>
			      	<div class="text_aba20"> <strong>Login e Senha</strong></div>
				  	<div class="text_2_aba20" align="right">Usuário</div>
				  	<div class="field_1_aba20">
				  		<h:inputText value="#{cadastroLojistaBean.nomeUsuario}" style="width:150px"/>
				  	</div>
				  	<div class="text_2_aba20" align="right">Senha</div>
				  	<div class="field_1_aba20">
				  		<h:inputSecret value="#{cadastroLojistaBean.senha}" style="width:150px"/>
				  	</div>
				  	<div class="text_2_aba20" align="right">Confirme Senha</div>
				  	<div class="field_1b_aba20">
				  		<h:inputSecret value="#{cadastroLojistaBean.confirmacaoSenha}" style="width:150px"/>
				  	</div>
				  	
				  	<div class="line_aba20a"></div>
				  	<div class="field_1a_aba20a" align="right">
				  		<a4j:commandLink action="#{cadastroLojistaBean.cadastrarParceiro}">
				  			<img src="images/botaoavancar_verde_2.gif" alt="" width="58" height="20" />
				  		</a4j:commandLink>
				  	</div>
			  	</h:panelGroup>	
      			
		
			</h:form>
		
		</ui:define>	
		
		
	</ui:composition>

</html>